extends "../i_TD_scope/i_TD_scope.gd"

func init():
	.init()
	name = "激光望远镜"
	resetdata()
	info = "极致瞄准：普攻必中，技能有20%概率击中弱点额外造成应造成伤害的40%伤害\n" + info

func _connect():
	._connect()
	masCha.connect("onAtkChara",self,"cantmiss")

func cantmiss(atkinfo):
	if atkinfo.atkType == Chara.AtkType.NORMAL:
		atkinfo.isMiss = false
	if !atkinfo.isMiss && atkinfo.atkType == Chara.AtkType.SKILL:
		if sys.rndPer(20):
			masCha.hurtChara(atkinfo.hitCha,atkinfo.hurtVal*0.4,atkinfo.hurtType,Chara.AtkType.EFF)
